<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="en">
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=11">
        <link rel="stylesheet" href="<%=basePath %>client/css/cssreset.css">
        <link rel="stylesheet" href="${pageContext.request.contextPath}/salejihui/css/pagination.css">
        <link rel="stylesheet" href="<%=basePath %>client/css/kehuguanli.css">
        <link rel="stylesheet" href="<%=basePath %>css/daohang.css">
        <script src="<%=basePath %>client/js/jquery-1.11.1.min.js"></script>
        <script src="<%=basePath %>client/jss/menu.js"></script>
        <script src="<%=basePath %>client/jss/menu1.js"></script>
        <script src="<%=basePath %>client/jss/jquery.table2excel.js"></script>
        <style type="text/css">
        body{
        	font-family:"微软雅黑";
        }
		.psxa{
			color:#708dac;
			width:100%;
			line-height:23px;
			text-align: center;
			margin-top:27px;
			font-family: '微软雅黑';
			cursor:pointer;
			font-size:16px;
		}
		
		a{
			font-family:"微软雅黑";
		   	text-decoration:none;
		   	color:#708dac;
		}
		.ims{
			position:relative;
			top:4px;
			right:22px;
		}
		.headers > p:nth-of-type(3) {
			width: 122px;
			line-height: 40px;
			text-align: center;
			background: #3dc444;
		}
		.headers > p:nth-of-type(1) {
			background: none;
			
		}
		.headers > p:nth-of-type(3) > a {
		color: #fff;
		}
		.headers > p:nth-of-type(1) > a,.headers > p:nth-of-type(2) > a {
		color: #000;
		}
		.daochu{
			float:right;
			margin-top:5px;
			padding:5px 10px;
			border:none;
			line-height:30px;
			border-radius:5px;
			background:#3dc444;
			color:#fff;
			cursor:pointer;
		}
		.bianji>form>.p8 {
		    width: 100%;
		    line-height: 52px;
		    background: #dfe4ea;
		}
		.bianji > form > .p8 > input{
			width: 56px;
		    height: 28px;
		    line-height:28px;
		    background: #57c049;
		    border: none;
		    border-radius: 5px;
		    color: #fff;
		    position: relative;
		    left: 200px;
		}
		
    </style>
    </head>
    <body>
    	<div class="headerxs">
    		<p class="pa">客户管理系统CRM</p>
    		<p class="rights">
	    		<img src="<%=basePath %>client/images/user.png" alt="" class="imgs">
	    		${staff.staff_name}
	    		<button onclick="ind()" class="buttons"></button>
    		</p>
    	</div>
    	<section>
    		<jsp:include page="/client/html/htop2.jsp"></jsp:include>
    		<div class="righta">
    			<div class="smalls">
    				<ul>
		    			<li name="oli">
		    				<p class="hangye">用户开发</p>
		    				<div class="fen">
		    					<div class="headers">
		    						<p><a href="<%=basePath %>client/weifencount.action?zhuizong=0">未开发</a></p>
		    						<p><a href="<%=basePath %>client/weifencount.action?zhuizong=1">正在跟踪</a></p>
		    						<p><a href="<%=basePath %>client/weifencount.action?zhuizong=2">已开发</a></p>
		    						<p><a href="<%=basePath %>client/weifencount.action?zhuizong=3" style="color:#000">回收站</a></p>
		    					</div>
		    				</div>
		    				<p class="daohan">
	    						<input type="text" id="select" placeholder="编号、名称、级别、手机号" style="vertical-align:middle;float:none;">
	    						<button onclick="selectClient()" class="butsss" style="vertical-align:middle;float:none;">搜索</button>
		    					<span class="xiang">已选中<span id="number"></span>项</span> 
		    					<span class="ganaa">|</span>
		    					<span onclick="deleteClient()" class="shangchu">删除</span>
		    					<span class="fenpeijuese">重新分配跟踪角色</span>
		    					<span class="shangchus" onclick="updatePage()">编辑</span>
		    					<!-- <button class="imgx" style="vertical-align:middle;"></button>
		    					<button class="imgd" style="vertical-align:middle;"></button> -->
		    					
                                <button class="daochu" onclick="exportClient()">导出客户</button>
		    					
		    				</p>
		    				<table>
		    					<thead>
		    						<tr class="trs">
		    							<td><input type="checkbox" class="check1" id="selectCheck" value="1" onclick="selectCheck()"></td>
		    							<td>编号</td>
		    							<td>客户姓名</td>
		    							<td>联系QQ</td>
		    							<td>电话</td>
		    							<td>开发的员工</td>
		    							<td>来源渠道</td>
		    							<td>追踪情况</td>
		    						</tr>
		    					</thead>
		    					<tbody>
		    					<tr class="h" style="display:none">
		    					<td class="hh">
		    					 <select name="" id="yuangonglianxi">
                        <c:forEach items="${staffList}" var="staffList">
                        	<option value="${staffList.staff_id}">${staffList.staff_name}</option>
                        </c:forEach>
                    	</select>
			    				</td>
			    				</tr>
		    						
		    					</tbody>
		    				</table>
		    			</li>
		    		</ul>
                    <div id="pageaaa" style="text-align:right;width:98%;"></div>
                     <div class="M-box" style="width:50%;margin: 30px auto;padding-left: 350px;margin-bottom: 15px;"></div>
    			</div>
    		</div>    		
    	</section>
    	<div class="smallsa"></div>
    	<div class="divaa" style="width:586px;">
    		<p class="paa">&nbsp;&nbsp;&nbsp;&nbsp;重新分配员工<span class="guan"><img src="../images/guanbi.png" alt=""></span></p>
			<form action="javascript:updateStaffId()" method="post">
				<p>
					<input type="hidden" id="depId" value="405">
                    	部门&nbsp;:<input type="text" value="市场部" style="text-align:left;color:#000;">
                    <%-- <select name="" id="depId" class="" onchange="findByStaff()">
                        <c:forEach items="${departments}" var="department">
                        	<option value="${department.department_id}">${department.department_name}</option>
                        </c:forEach>
                    </select> --%>
                                
                </p>
                <p>人员&nbsp;:
                    <select name="" id="depStaff">
                        
                    </select>
                </p>
				<p class="paf"><input type="button" value="取消"><input type="submit" value="确定"></p>
			</form>
    	</div>
    	<%-- <div class="xinjian">
    		<p>新建客户<img src="<%=basePath %>client/images/guanbi.png" alt=""></p>
    		<form action="javascript:saveClient()" method="post" onsubmit="return texts()">
                <p>客户姓名<input type="text" id="client_name"><span>*</span></p>
                <p>电话&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" id="client_phone"><span>*</span></p>
                <p>联系QQ<input type="text" id="client_qq"><span>*</span></p>
                <p>来源渠道<input type="text" id="client_record"><span>*</span></p>
                <p>追踪情况<input type="text" value="未开发" id="client_remarks" disabled="disabled"><span></span></p>
                <p><input type="submit" value="确定"></p>
            </form>
    	</div> --%>
    	<!-- <div class="dao">
            <p>导入数据<img src="../images/guanbi.png" alt=""></p>
            <div>
                <p>仅支持以逗号为分隔符的文本文件【filename.csv】,文件最大10MB。请按照数据模板的格式导入数据,模板中的表头名称不可更改,表头行不能删除。</p>
                <p><a href="../client/downFile.action">下载数据模板</a></p>
                <form id="upload-form" action="javascript:excilClient()" method="post" enctype="multipart/form-data" >
                　　<div>
                        <p>请选择需要导入的csv文件</p>
                        <p><input type="file" id="filea" name="upload"/></p>
                    </div>
                    <p>上传文件可能需要几分钟，取决于文件大小和网速</p>
                　　<p><input type="button" value='取消' class="buts"><input type="submit" value="开始导入"/></p>
                </form>
            </div>
        </div> -->
        <!-- <div class="chengo">
        	<p>导入成功</p>
        	<div>
        		<p>仅支持以逗号为分隔符的文本文件【filename.csv】,文件最大10MB。请按照数据模板的格式导入数据,模板中的表头名称不可更改,表头行不能删除。</p>
        		<p><button>确定</button></p>
        	</div>
        </div> -->
        <div class="bianji" style="height:432px;">
    		<p>编辑资料<img src="../images/guanbi.png" alt="" class="gb"></p>
    		<form action="javascript:update()" method="post" onsubmit="return edits()">
    			<p>名称<input type="text" id="upclient_name" class="users"><span>*</span></p>
    			<p>电话<input type="text" id="upclient_phone" class="phones"><span>*</span></p>
                <p>联系QQ<input type="text" style="margin-left:20px;" id="upclient_qq"><span>*</span></p>
                <p>分配的员工<input type="text" style="margin-left:20px;" id="upstaff_id"><span>*</span></p>
    			<p>来源渠道<input type="text" id="upclient_record" class="records" style="margin-left:20px;"><span>*</span></p>
    			<p>追踪情况<input type="text" value="未开发" id="upclient_remarks" class="remarks" style="margin-left:20px;" disabled="disabled">&nbsp;&nbsp;&nbsp;&nbsp;</p>
    			<p class="p8"><input type="submit" value="确定"></p>
    		</form>
    	</div>
    	<p class="client_id" style="display: none"></p>
        <div style="display: none">
        	<span class="pageCount">${pageCount}</span>
        	<span class="pageNum">${pageNum}</span>
    	</div>
    </body>
    <script src="${pageContext.request.contextPath}/salejihui/js/jquery.pagination.js"></script>
    <script>
    $('.M-box').pagination({
    	pageCount: ${PageCount},//总页数
		current: ${PageNum},//当前页码
	callback:function(api){
		var pageNum=api.getCurrent();
		var selectd="${select}";
        $.ajax({  
            type : "POST",  
            url : "<%=basePath%>client/findByAllyikaifahuke.action",//路径   
            data : {  
            	pageNum : api.getCurrent(),
            	selectgen  : selectd
            },
            success : function(data) {
            	var number=data[0].number;//总页数
            	api.setPageCount(number);//动态修改总页数为20页
            	var pageNum=data[0].pageNum;
            	var text="";
            	$('.remove').remove();
              for(var i=0;i<data[0].list.length;i++){
            	  text=$('<tr class="remove"><td><input type="checkbox" class="check1" value="'+data[0].list[i].client_id+'" name="items" onclick="checkedShow()"></td>'
       					+'<td><a style="text-decoration:none;color:#8c8c8d;font-size:14px;" href="../client/newrecord.action?id='+data[0].list[i].client_id+'">'+data[0].list[i].client_id+'</a></td><td>'+data[0].list[i].client_name+'</td>'
       					+'<td>'+data[0].list[i].client_qq+'</td><td>'+data[0].list[i].client_phone+'</td><td>'+data[0].list[i].newstaffName+'</td><td>'+data[0].list[i].client_record+'</td>'
       					+'<td>'+data[0].list[i].client_remarks+'</td><td></td>'
       					+'</tr>');
                    $('tbody').append(text);
                  }
            }
        });  
        var depId = $("#depId").val();
   	   $.ajax({
 				type:"post",
 				data:"id="+depId,
 				url:"<%=basePath %>staff/findByDepId.action",
 				success:function(data){
 					var jsons = eval("("+data+")");
 					$("#depStaff").html("");
 					var staff2 = "<option value='0'>请选择员工</option>";
 					$("#depStaff").append(staff2);
 					for(var i =0,l = jsons.length;i < l;i++){
 						var aaaa = "<option value='"+jsons[i].staff_id+"'>"+jsons[i].staff_name+"</option>"
 						$("#depStaff").append(aaaa);
 					}
 				},
 				error:function(e){
 					alert("发生未知错误请刷新页面");
 				}

 	   		 });
    }
},function(api){
    var pageNum;
    var selectd="${select}";
    $.ajax({  
        type : "POST",  
        url : "<%=basePath%>client/findByAllyikaifahuke.action",//路径  
        data : {  
        	pageNum : api.getCurrent(),
        	selectgen  : selectd
        },
        success : function(data) {		     
        	var number=data[0].number;//总页数
        	api.setPageCount(number);//动态修改总页数为20页
        	var pageNum=data[0].pageNum;
        	var text="";  
            for(var i=0;i<data[0].list.length;i++){
            	 text=$('<tr class="remove"><td><input type="checkbox" class="check1" value="'+data[0].list[i].client_id+'" name="items" onclick="checkedShow()"></td>'
        					+'<td><a style="text-decoration:none;color:#8c8c8d;font-size:14px;" href="../client/newrecord.action?id='+data[0].list[i].client_id+'">'+data[0].list[i].client_id+'</a></td><td>'+data[0].list[i].client_name+'</td>'
        					+'<td>'+data[0].list[i].client_qq+'</td><td>'+data[0].list[i].client_phone+'</td><td>'+data[0].list[i].newstaffName+'</td><td>'+data[0].list[i].client_record+'</td>'
        					+'<td>'+data[0].list[i].client_remarks+'</td><td></td>'
        					+'</tr>');
                         $('tbody').append(text);
                  }  
        }
    });
    var depId = $("#depId").val();
	   $.ajax({
				type:"post",
				data:"id="+depId,
				url:"<%=basePath %>staff/findByDepId.action",
				success:function(data){
					var jsons = eval("("+data+")");
					$("#depStaff").html("");
					var staff2 = "<option value='0'>请选择员工</option>";
					$("#depStaff").append(staff2);
					for(var i =0,l = jsons.length;i < l;i++){
						var aaaa = "<option value='"+jsons[i].staff_id+"'>"+jsons[i].staff_name+"</option>"
						$("#depStaff").append(aaaa);
					}
				},
				error:function(e){
					alert("发生未知错误请刷新页面");
				}

	   		 });
});
    
    </script>
    <script>
    function ind(){
    	window.location.href= "../notice/findByAll.action";
    }
    $('.paf>input:nth-of-type(1)').click(function(event) {
        $('.divaa').css('display', 'none');
        $('.smallsa').css('display', 'none');
    });
    function ind(){
    	window.location.href= "../notice/findByAll.action";
    }
    $("#all").click(function(){   
            if(this.checked){   
                $("#list :checkbox").prop("checked", true);  
            }else{   
            $("#list :checkbox").prop("checked", false);
            }   
        });
    var usern=document.getElementById('usernames');
    var jb=document.getElementById('jibie');
    var pho=document.getElementById('photo');
    function texts(){
        var val=true;
        var pat=/\s/;
        var use=usern.value;
        var pst=/^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
        var jie=jb.value;
        var phots=pho.value;
        if(use==''||pat.test(use)){
            alert("请输入名称！");
            val=val&&false;
        }else if(phots==''||!pst.test(phots)||pat.test(phots)){
            alert("请输入电话号码或正确格式的号码！");
            val=val&&false;
        }
        return val;
    }
     $(function() {
            $(".daochu").click(function(){
                $("table").table2excel({
                    exclude: ".noExl",
                    name: "Excel Document Name",
                    filename: "myFileName",
                    exclude_img: true,
                    exclude_links: true,
                    exclude_inputs: true
                });
            });
            
        });
     $('.dao form>p:nth-of-type(2)>input:nth-of-type(2)').click(function(event) {
        $('.chengo').css('display', 'block');
        $('.dao').css('display', 'none');
     });
     $('.chengo>div>p:nth-of-type(2)>button').click(function(event) {
     	$('.chengo').css('display', 'block');
     	$('.smallsa').css('display', 'block');
     });
    $('.daoru').click(function(event) {
            $('.dao').css('display', 'block');
            $('.smallsa').css('display', 'block');
    });
    $('.dao>p>img').click(function(event) {
        $('.dao').css('display', 'none');
        $('.smallsa').css('display', 'none');
    });
    $('.buts').click(function(event) {
        $('.dao').css('display', 'none');
        $('.smallsa').css('display', 'none');
    });
	$('.daohan>span:nth-of-type(4)').click(function(event) {
		$('.divaa').css('display', 'block');
		$('.smallsa').css('display', 'block');
	});
	$('.guan').click(function(event) {
		$('.divaa').css('display', 'none');
		$('.smallsa').css('display', 'none');
	});
	$('.imgd').click(function(event) {
		$('.xinjian').css('display', 'block');
		$('.smallsa').css('display', 'block');
	});
	$('.xinjian>p>img').click(function(event) {
		$('.xinjian').css('display', 'none');
		$('.smallsa').css('display', 'none');
	});
	 $(".imgx").click(function(){

		if($(".dia").css("display")=="none"){

		$(".dia").show();

		}else{

		$(".dia").hide();

	}

	});	
	
	function selectCheck(){
	    	   var judge = $("#selectCheck").val();
	    	   var objs = document.getElementsByName("items");
			   if(judge == 1){
				   for(var i = 0,l = objs.length;i < l;i++){
		    		   objs[i].checked = true;
		    	   }
				   $("#selectCheck").val(0);
	    	   }else{
	    		   for(var i = 0,l = objs.length;i < l;i++){
		    		   objs[i].checked = false;
		    	   }
	    		   $("#selectCheck").val(1);
	    	   }
	    	   
	    	   checkedShow();
	       }
	function checkedShow(){
		  		var str = "";
	    	    var number = 0;
	    	    var obj = document.getElementsByName("items");
				for(var i = 0,l = obj.length;i < l;i++){
					if(obj[i].checked){
						str += obj[i].value+",";
						number++;
					}
				}    	   
	    			
	    	    if(str == ""){
	    	    	$('.xiang').css('display', 'none');
	    		    $('.ganaa').css('display', 'none');
	    		    $('.shangchu').css('display', 'none');
	    		    $('.shangchus').css('display', 'none');
	    		    $('.fenpeijuese').css('display', 'none');
	    		  
	    	    }else{
	    		   $(".client_id").html(str);
	    		   $("#number").html(number);
	    		   $('.xiang').css('display', 'inline');
	    		   $('.ganaa').css('display', 'inline');
	    		   $('.shangchu').css('display', 'inline');
	    		   $('.shangchus').css('display', 'inline');
	    		   $('.fenpeijuese').css('display', 'inline');
	    		  
	    	   }
		  	}
	 function updatePage(){
		var lengths=$(".check1:checked").length;
		if(lengths!=1){
			alert("只能编辑一项！");
		}else{
			$(".bianji").css("display","block");
			$(".smallsa").css("display","block");
			var client_id = $(".client_id").html();
			if(client_id == ""){
	  			return;
	  		}
    	    
	  		client_id = client_id.substring(0,client_id.length-1);
	  		var b = client_id.split(",")
    	    if(b.length > 1){
    		   return;
    	    }
			var depStaff = $("#depStaff option:selected").val();
	      	   $.ajax({
	   				type:"post",
	   				data:"client_id="+client_id,
	   				url:"<%=basePath %>client/findById.action",
	   				success:function(data){
	   					var json = eval("("+data+")");
	   					$("#upclient_name").val(json[0].client_name);
	   					$("#upclient_phone").val(json[0].client_phone);
	   					$("#upclient_record").val(json[0].client_record);
	   					$("#upclient_remarks").val(json[0].client_remarks);
	   					$("#upclient_qq").val(json[0].client_qq);
	   					$("#upstaff_id").val(json[0].newstaffName);
	  				},
	  				error:function(e){
	  					alert("发生未知错误请刷新页面");
	  				}
	   		 });
		}
	} 
	$(".gb").click(function(){
		$(".bianji").css("display","none");
		$(".smallsa").css("display","none");
	})
			 
		function edits(){
			var users = $(".users").val();
	    	var phones = $(".phones").val();
	    	var records = $(".records").val();
	    	var remarks = $(".remarks").val();
	    	var p=/\s/;
	    	 var psat=/^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
	    	if(users==""||p.test(users)){
	    		alert("请输入姓名！");
	    		return false;
	    	}else if(phones==""||p.test(phones)||!psat.test(phones)){
	    		alert("请输入电话或正确格式的电话号码！");
	    		return false;
	    	}else if(records==""||p.test(records)){
	    		alert("请输入来源渠道！");
	    		return false;
	    	}
	    	/*else if(remarks==""||p.test(remarks)){
	    		alert("4");
	    		return false;
	    	}*/
	    	return true;
		}
		
		function saveClient(){
    		var name = $("#client_name").val();
    		var phone = $("#client_phone").val();
    		var client_remarks = $("#client_remarks").val();
    		var client_record = $("#client_record").val();
    		var client_qq = $("#client_qq").val();
    		$.ajax({
				type:"post",
				url:"<%=basePath %>client/saveByPer.action",
				data:"client_name="+name+"&client_phone="+phone+"&client_remarks="+client_remarks+"&client_record="+client_record+"&client_qq="+client_qq,
				success:function(data){
					alert(data);
					if(data == "新增成功"){
						location.href="<%=basePath %>client/weifencount.action?zhuizong=2";
					}
				},
				error:function(e){
				}

	   		 });
    	}
		
		function deleteClient(){
    		var client_id = $(".client_id").html();
    		
    		client_id = client_id.substring(0,client_id.length-1);
    		$.ajax({
				type:"post",
				url:"<%=basePath %>client/deleteByClients.action",
				data:"ids="+client_id,
				success:function(data){
					alert(data);
					if(data == "删除成功"){
						location.href= "<%=basePath %>client/weifencount.action?zhuizong=2";
					}
				},
				error:function(e){
				}

	   		 });
    	}
		
	
		 function update(){
	    	   var client_id = $(".client_id").html();
	    	   if(client_id == ""){
	    		   return;
	    	   }
	    	   client_id = client_id.substring(0,client_id.length-1);
	    	   var b = client_id.split(",")
	    	   if(b.length > 1){
	    		   return;
	    	   }
	    	   var upclient_name = $("#upclient_name").val();
	    	   var upclient_phone = $("#upclient_phone").val();
	    	   var upclient_record = $("#upclient_record").val();
	    	   var upclient_remarks = $("#upclient_remarks").val();
	    	   var upclient_qq = $("#upclient_qq").val();
	      	   $.ajax({
	   				type:"post",
	   				data:"client_id="+client_id+"&client_name="+upclient_name+"&client_phone="+upclient_phone+"&client_record="+upclient_record+"&client_remarks="+upclient_remarks+"&client_qq="+upclient_qq,
	   				url:"<%=basePath %>client/updateById.action",
	   				success:function(data){
	  					alert(data);
	  					location.href="<%=basePath %>client/weifencount.action?zhuizong=2";
	  				},
	  				error:function(e){
	  					alert("发生未知错误请刷新页面");
	  					
	  				}

	 	   		 });

	         } 
    </script>
    <script type="text/javascript">
    //搜索查询
    function selectClient(){
		var select = $("#select").val();
		location.href="../client/weifencount.action?select="+select+"&&zhuizong=2";
	}
    
    function findByStaff(){
  	   var depId = $("#depId").val();
  	   $.ajax({
				type:"post",
				data:"id="+depId,
				url:"<%=basePath %>staff/findByDepId.action",
				success:function(data){
					var jsons = eval("("+data+")");
					$("#depStaff").html("");
					var staff2 = "<option value='0'>请选择员工</option>";
					$("#depStaff").append(staff2);
					for(var i =0,l = jsons.length;i < l;i++){
						var aaaa = "<option value='"+jsons[i].staff_id+"'>"+jsons[i].staff_name+"</option>"
						$("#depStaff").append(aaaa);
					}
				},
				error:function(e){
					alert("发生未知错误请刷新页面");
				}

	   		 });

     }
	    	 function updateStaffId(){
	    	   var client_id = $(".client_id").html();
	    	   client_id = client_id.substring(0,client_id.length);
	      	   var depId = $("#depId").val();
	      	   var depStaff = $("#depStaff option:selected").val();
	      	   $.ajax({
	   				type:"post",
	   				data:"client_id="+client_id+"&depId="+depId+"&staff_id="+depStaff+"&select=1",
	   				url:"<%=basePath %>client/updateByPer.action",
	   				success:function(data){
	  					alert(data);
	  					location.href="<%=basePath %>client/weifencount.action?zhuizong=2";
	  				},
	  				error:function(e){
	  					alert("请选择部门");
	  				}

	 	   		 });

	         } 
	 </script>
	 <script>
	 function excilClient(){
 		var file = $("#filea").val();
 		$.ajax({
				type:"post",
				url:"<%=basePath %>client/daoru.action",
				data:"file="+file,
				success:function(data){
					alert(data);
				},
				error:function(data){
					alert(data)
				}

	   		 });
 	}
		  	function exportClient(){
		  		 var client_id =1; 
		  		location.href="../client/daochugenzong.action?name=2";
		  	}
		  	
	  </script>
</html>